package com.xiaoxi.prototypemode.product;

/**
 * @ClassName UnderlinePenProduct
 * @Description
 * @Author xiaoxi
 * @Date 2023/3/12 15:07
 * @Version 1.0
 */
public class UnderlinePenProduct extends AbstractProduct {

    private char ch;

    public UnderlinePenProduct(char ch) {
        this.ch = ch;
    }

    @Override
    public void use(String str) {
        System.out.println(str);
        for (int i = 0 ; i < str.length();i++) {
            System.out.print(ch);
        }
        System.out.println();
    }

}
